<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt-rt"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt"%>
<%@ taglib uri="/WEB-INF/tld/pageutil.tld" prefix="pu"%>
<%@ taglib uri="/WEB-INF/tld/mallutil.tld" prefix="mu"%>
<%@ page import="com.yaodian100.core.common.utils.ServerValue"%>
<c-rt:set var="imgDomain"><%=ServerValue.getImgDomain()%></c-rt:set>
<script src="/js/jquery.qtip-1.0.0-rc3.min.js"></script>
<script src="/js/jquery.lazyload.yaodian100.js"></script>
<script type="text/javascript">

<!--
function toAddCartDetail(productId, spec, categoryId, type){
	var error="";
	if($('#type').attr('value')=='1'){
		error+="预购商品只能直接购买！\r\n";
	} else {
		if($('#spec').attr('value')==''){
			error+="请选择商品属性！\r\n";
		}
	}
	var itemNo="itemNo:\""+productId+"\",";
	var specNo="specNo:\""+spec+"\",";
	var qty="qty:\"1\",";
	var categoryPath="categoryPath:\""+categoryId+"\",";
	var type="type:\""+type+"\",";
	var webpath="webpath:\"<%=ServerValue.getFrontContextPath()%>/shopping/cart.do?\",";
	var presents="presents:null,";
	var addOns="addOns:null";
	var json="{";
	json+=itemNo;
	json+=specNo;
	json+=qty;
	json+=categoryPath;
	json+=type;
	json+=webpath;
	json+=presents;
	json+=addOns;
	json+="}";
	var jsonObj;
	//alert(json);
	eval("jsonObj="+json);
	//alert(jsonObj);
	addCart(jsonObj);
}

$(function(){
	$('img').lazyload({
		placeholder:"http://s.yaodian100.com/images/none1.gif"
	});
	$('img', $('.sub-menu')).each(function(){
		$(this).attr('src', $(this).attr('original'));
	});
	
	$('.pd-img').each(function(){
		$(this).mouseover(function(){
			index=$(this).attr('id').replace('pd-img_', '');
			$('img', $('#morepdinfo1_'+index)).each(function(){
				$(this).attr('src', $(this).attr('original'));
			});
		});
	});
	$('#form_searchKeyword').keyup(function(){
		$('#keyword').attr('value', $('#form_searchKeyword').attr('value'));
		if($(this).attr('value')!=''){
			hadKeyin=true;
			$('#keyword').attr('class', 'search-page');
			$('#relatedSort').show();
		}else{
			hadKeyin=false;
			$('#keyword').attr('class', 'search-dpage');
			$('#relatedSort').hide();
		}
	});
	$('#form_searchKeyword').change(function(){
		$('#keyword').attr('value', $('#form_searchKeyword').attr('value'));
		if($(this).attr('value')!=''){
			hadKeyin=true;
			$('#keyword').attr('class', 'search-page');
			$('#relatedSort').show();
		}else{
			hadKeyin=false;
			$('#keyword').attr('class', 'search-dpage');
			$('#relatedSort').hide();
		}
	});
	$('#clearSearchFilterForm').click(function(){
		document.formObj.minPrice.value='';
		document.formObj.maxPrice.value='';
		
		document.formObj.partner.checked=false;
		document.formObj.flag1.checked=false;
		document.formObj.flag2.checked=false;
		document.formObj.flag3.checked=false;
		document.formObj.flag4.checked=false;
		document.formObj.flag5.checked=false;
		document.formObj.flag6.checked=false;
		document.formObj.flag7.checked=false;
		$('#checkboxImg').attr('src', '/images/search/checkbox-null.gif');
		totalCheck=0;
	});

	$('.pferent-warp').mouseover(function(){
		$('.pferent-warp > a').attr('class', 'pf-harea-f');
	});
	$('.pferent-warp').mouseout(function(){
		$('.pferent-warp > a').attr('class', 'pf-harea');
	});
	
	$('#checkAllFlag').click(function(){
		if($('#checkboxImg').attr('src')=='/images/search/checkbox-on.gif'){
			document.formObj.flag2.checked=false;
			document.formObj.flag3.checked=false;
			document.formObj.flag4.checked=false;
			document.formObj.flag5.checked=false;
			document.formObj.flag6.checked=false;
			document.formObj.flag7.checked=false;
			$('#checkboxImg').attr('src', '/images/search/checkbox-null.gif');
			totalCheck=0;
		}else{
		document.formObj.flag2.checked=true;
		document.formObj.flag3.checked=true;
		document.formObj.flag4.checked=true;
		document.formObj.flag5.checked=true;
		document.formObj.flag6.checked=true;
		document.formObj.flag7.checked=true;
		$('#checkboxImg').attr('src', '/images/search/checkbox-on.gif');
		totalCheck=6;
		}
	});
	$('.pferent-warp').mouseover(function(){
		$('#promotionEventItem').show();
	});
	$('.pferent-warp').mouseout(function(){
		$('#promotionEventItem').hide();
	});
	$('.op-wrap').mouseover(function(){
		$('.filterdrop').show();
	});
	$('.op-wrap').mouseout(function(){
		$('.filterdrop').hide();
	});

	$('.pd-img').each(function(){

		var index=$(this).attr('id').replace('pd-img_', '');
		$('#pd-img_'+index).mouseover(function(){
			
			var offset = $('#pimg_'+index).offset();
	      $('#morepdinfo1_'+index).css('left', offset.left+140);
	      $('#morepdinfo1_'+index).css('top', offset.top-90);
	      $('#morepdinfo1_'+index).show();
	  	});
		$('#pd-img_'+index).mouseout(function(){
			$('#morepdinfo1_'+index).hide();
		});
	});
	$('.camCheckbox').each(function(i){
		$(this).click(function(){
			if($(this).attr('checked')){
				totalCheck++;
				if(totalCheck==6){
					$('#checkboxImg').attr('src', '/images/search/checkbox-on.gif');
				}else if(totalCheck>0){
					$('#checkboxImg').attr('src', '/images/search/checkbox-gray.gif');
				}else{
					$('#checkboxImg').attr('src', '/images/search/checkbox-null.gif');
				}
			}else{
				totalCheck--;
				if(totalCheck>0){
					$('#checkboxImg').attr('src', '/images/search/checkbox-gray.gif');
				}else{
					$('#checkboxImg').attr('src', '/images/search/checkbox-null.gif');
				}
			}
		});
	});
	$('.filterdrop > li > a').each(function(){
		$(this).click(function(){
			$('.filterdrop > li > a').each(function(){
				$(this).removeClass('switchon');
			});
			$(this).addClass('switchon');
			$('.filterdrop').hide();
		});
	});
});
<c-rt:set var="flagCount" value="0" scope="request"/>
<c-rt:if test="${param.flag2=='1'}">
<c-rt:set var="flagCount" value="${flagCount+1}" scope="request"/>
</c-rt:if>
<c-rt:if test="${param.flag3=='1'}">
<c-rt:set var="flagCount" value="${flagCount+1}" scope="request"/>
</c-rt:if>
<c-rt:if test="${param.flag4=='1'}">
<c-rt:set var="flagCount" value="${flagCount+1}" scope="request"/>
</c-rt:if>
<c-rt:if test="${param.flag5=='1'}">
<c-rt:set var="flagCount" value="${flagCount+1}" scope="request"/>
</c-rt:if>
<c-rt:if test="${param.flag6=='1'}">
<c-rt:set var="flagCount" value="${flagCount+1}" scope="request"/>
</c-rt:if>
<c-rt:if test="${param.flag7=='1'}">
<c-rt:set var="flagCount" value="${flagCount+1}" scope="request"/>
</c-rt:if>

var totalCheck=${flagCount};
function getContent(rel){
	return '<div class="morepdinfo1"><div class="arrowarea"><img src="/images/mpdinfo-areal.gif" border="0"></div><div class="pdinfo"><a href="#"><img src="'+rel+'" alt="" width="250" height="250"/></a></div></div>';
}

function encodeKeyword2_(){
	if(document.formObj.searchKeyword.value=="" && document.formObj.z.value=='' && document.formObj.brandId.value==''){
		alertDialog('高级搜索','请输入<em>商品关键字</em>或商品类别！','','400','180');
	}else{
		encodeKeyword2();
	}
	
}
-->
</script>
<style>
.filtertool .pferent-warp .pf-harea-f .checkbox{margin:5px 5px 0;*margin:5px 4px 0;cursor:pointer;float:left;}
.morepdinfo1{position:absolute; z-index:999;top:5px;left:50px;width:310px;}
.morepdinfo1 .arrowarea{float:left;margin:5px 0px;overflow:hidden;}
.morepdinfo1 .arrowarea img{margin-top:140px;}
.morepdinfo1 .pdinfo{float:left;border:2px solid #d03070;padding:10px;background:#FFF;}
.morepdinfo1 .pdinfo img{padding:5px;border:#CCC 1px solid;}
.morepdinfo1 .pdinfo em a{display:block;width:21em;height:15px;overflow:hidden;font-size:12px;color:#d02b6d;}
.morepdinfo1 .pdinfo h2{display:block;width:17em;height:36px;*height:35px;overflow:hidden;font-size:15px;margin:5px 0;}
.morepdinfo1 .pdinfo .money-area{display:block;}
.morepdinfo1 .pdinfo .money-area s{text-decoration:none;display:inline-block; width:9em; float:left;padding-top:3px;}
.morepdinfo1 .pdinfo .money-area s span{background:url(/images/s_line.gif) repeat-x 0 0; color:#999;padding-top:.15em; background-position:0 .15em;}
.morepdinfo1 .pdinfo .money-area strong{display:inline-block;float:left;color:#d02b6d; font-weight:bold;display:block; text-align:right; width:11.5em; height:2em;overflow:hidden;}
.morepdinfo1 .pdinfo .money-area strong span{font-size:15px; display:inline-block;padding-top:1px;}
.morepdinfo1 .pdinfo .pferent-area{clear:both;line-height:20px;}
.morepdinfo1 .pdinfo .pferent-area p{width:250px;height:20px;overflow:hidden;color:#666;}
.morepdinfo1 .pdinfo .btn-area{margin:10px 45px 0px;float:none;width:160px;}
.morepdinfo1 .pdinfo .fielddot{background:url(/images/link_dote.gif) repeat-x 0 center;font-size:0px;width:250px;height:15px;}
.content .search-list li em,.search-list li h6{font-size:15px; font-weight:bold; margin-bottom:.2em; display:block; width:24em; line-height:1.3em; height:1.2em; overflow:hidden;}
.content .search-list li .pd-info{float:left; display:block;width:400px;margin:0 1em; background:url(/images/ca_big3_line.gif) repeat-y right 0;}
</style>
<s:form name="formObj" action="search.do" method="get" id="formObj" acceptcharset="UTF-8">
			<input type="hidden" name="totalPage" value="${pager.pageSize }"/>
			<s:hidden name="pager.currentPage" id="currentPage"/>
			<s:hidden name="type"/>
			<s:hidden name="display"/>
			<s:hidden name="sortOrder"/>
	<input type="hidden" name="catLevel" value="${param.catLevel }"/>
	<input type="hidden" name="searchWithBrief" value="${!empty param.searchWithBrief?param.searchWithBrief:'0' }"/>
	<input type="hidden" name="searchWithDescription" value="${!empty param.searchWithDescription?param.searchWithDescription:'0' }"/>
	<input type="hidden" name="startDate" value="${param.startDate }"/>
	<input type="hidden" name="endDate" value="${param.endDate }"/>
	<input type="hidden" name="parentCatId" value="${pu:getParentCategoryId(param.z) }"/>
	<input type="hidden" name="z" class="z" value="${param.z }"/>
	<input type="hidden" name="fuzzySearch" value="${param.fuzzySearch }"/>
	<input type="hidden" name="brandId" value="${param.brandId }"/>
<s:if test="%{adv != null}">
	<s:iterator value="adv" var="advString">
	<input type="hidden" name="adv" value="${advString}"></input></s:iterator>
</s:if>
	<!-- content start -->
	<div class="content" id="searchresults"><!-- 过滤bar -->
	
<c-rt:if test="${result1.total>0}">
	<c-rt:if test="${!empty result1.relatedTerms}">
	<div class="otherkword"> 
		<h4>相关搜索：</h4>
		<c-rt:forEach items="${result1.relatedTerms}" var="relatedTerm" varStatus="status">
		<c-rt:if test="${status.index!=0}"> , </c-rt:if><a href="#" onclick="$('#form_searchKeyword').attr('value', '${relatedTerm }');encodeKeyword2_();">${relatedTerm }</a>
		</c-rt:forEach>
      </div> 
      </c-rt:if>
	<div class="filterbar">
	<div class="filtertool">
		
          <div class="f-lt"><span>关键字：</span><input type="text" class="filter-kword" id="form_searchKeyword" name="searchKeyword" value="${pu:urlDecoding(param.searchKeyword, 'UTF-8') }"></div> 
          <div class="f-lt"><span class="fprice-txt">价格区间：</span><input type="text" class="filter-price" name="minPrice" value="${minPrice }"></div> 
          <div class="f-lt"><span class="fprice-txt2">至</span><input type="text" class="filter-price" name="maxPrice" value="${maxPrice }"><span class="fprice-txt2">元</span></div> 
          <div class="f-lt"> 
          <div class="pferent-warp"> 
          <a href="javascript:void(0);" id="checkAllFlag" class="pf-harea">
          
          <c-rt:if test="${flagCount==0}">
          <img id="checkboxImg" src="/images/search/checkbox-null.gif" class="checkbox"/>
          </c-rt:if>
          <c-rt:if test="${flagCount>0 && flagCount<6}">
          <img id="checkboxImg" src="/images/search/checkbox-gray.gif" class="checkbox"/>
          </c-rt:if>
          <c-rt:if test="${flagCount==6}">
          <img id="checkboxImg" src="/images/search/checkbox-on.gif" class="checkbox"/>
          </c-rt:if>
          <span>限优惠活动</span></a> 
          <ul id="promotionEventItem" class="pfitem" style="display:none"> 
          <li><label><input type="checkbox" class="checkbox camCheckbox" value="1" name="flag2" <c-rt:if test="${param.flag2=='1' }">checked="checked"</c-rt:if>><span>立减优惠</span></label></li> 
          <li><label><input type="checkbox" class="checkbox camCheckbox" value="1" name="flag3" <c-rt:if test="${param.flag3=='1' }">checked="checked"</c-rt:if>><span>立折优惠</span></label></li> 
          <li><label><input type="checkbox" class="checkbox camCheckbox" value="1" name="flag4" <c-rt:if test="${param.flag4=='1' }">checked="checked"</c-rt:if>><span>送赠品</span></label></li> 
          <li><label><input type="checkbox" class="checkbox camCheckbox" value="1" name="flag6" <c-rt:if test="${param.flag6=='1' }">checked="checked"</c-rt:if>><span>任选商品</span></label></li> 
          <li><label><input type="checkbox" class="checkbox camCheckbox" value="1" name="flag7" <c-rt:if test="${param.flag7=='1' }">checked="checked"</c-rt:if>><span>加购商品</span></label></li> 
          <!--[if IE 6]><iframe class="selectbug" frameborder="0" scrolling="no" src="about:blank"></iframe><![endif]--> 
          </ul></div></div> 
          <div class="f-lt"><div class="daphne-wrap"><label><input type="checkbox" class="checkbox" id="DAPHNE" value="DAPHNE" name="partner" <c-rt:if test="${pu:contain(param.partner, 'DAPHNE') }">checked="checked"</c-rt:if>><span>门店取货</span></label></div></div>
          
          <div class="f-lt"><label><input type="checkbox" class="checkbox" id="flag01" value="1" name="flag1" <c-rt:if test="${param.flag1=='1' }">checked="checked"</c-rt:if>></input><span>不包含预购</span></label></div> 
          <div class="submit-wrap"><a id="submitSearchFilterForm" href="#" onclick="encodeKeyword2_();return false;" class="submit-btn"><span>确认</span></a><a id="clearSearchFilterForm" href="#" class="clear-btn2"><span>清除</span></a></div> 
        
        </div> 
        <div class="ordertool"> 
	<div class="f-lt"><span>浏览模式：</span></div>
	<div class="mode-icon01-f"><span>列表</span></div>
	<a class="mode-icon02" href="###" onclick="document.formObj.display.value='image';encodeKeyword2_();return false;"><span>图片</span></a>
	
	<div class="f-lt"><span>排序：</span><div class="op-wrap"><a class="orderbtn" href="javascript:void(0);">
	<c:choose>
		<c:when test="${param.sortOrderType==0}">
		上架时间新到旧
		</c:when>
		<c:when test="${param.sortOrderType==1}">
		上架时间旧到新
		</c:when>
		<c:when test="${param.sortOrderType==2}">
		价格低到高
		</c:when>
		<c:when test="${param.sortOrderType==3}">
		价格高到低
		</c:when>
		<c:when test="${param.sortOrderType==4}">
		销售排行高到低
		</c:when>
		<c:when test="${param.sortOrderType==5}">
		销售排行低到高
		</c:when>
		<c:when test="${param.sortOrderType==6}">
		相关度
		</c:when>
		<c:otherwise>
		<c-rt:if test="${empty param.searchKeyword}">
		上架时间新到旧
		</c-rt:if>
		<c-rt:if test="${!empty param.searchKeyword}">
		相关度
		</c-rt:if>
		</c:otherwise>
	</c:choose>
	</a>
	
	<ul class="filterdrop" style="display:none">
	<li><${param.sortOrderType==0?'div class="switchon"':'a' } href="#" onclick="$('#sortOrderType').attr('value', 0);$('.orderbtn').html($(this).html());encodeKeyword2_()" >上架时间新到旧</${param.sortOrderType==0?'div':'a' }></li>
	<li class="groupend"><${param.sortOrderType==1?'div class="switchon"':'a' } href="#" onclick="$('#sortOrderType').attr('value', 1);$('.orderbtn').html($(this).html());encodeKeyword2_()" >上架时间旧到新</${param.sortOrderType==1?'div':'a' }></li>
	<li><${param.sortOrderType==2?'div class="switchon"':'a' } href="#" onclick="$('#sortOrderType').attr('value', 2);$('.orderbtn').html($(this).html());encodeKeyword2_()" >价格低到高</${param.sortOrderType==2?'div':'a' }></li>
	<li class="groupend"><${param.sortOrderType==3?'div class="switchon"':'a' } href="#" onclick="$('#sortOrderType').attr('value', 3);$('.orderbtn').html($(this).html());encodeKeyword2_()" >价格高到低</${param.sortOrderType==3?'div':'a' }></li>
	<li><${param.sortOrderType==4?'div class="switchon"':'a' } href="#" onclick="$('#sortOrderType').attr('value', 4);$('.orderbtn').html($(this).html());encodeKeyword2_()" >销售排行高到低</${param.sortOrderType==4?'div':'a' }></li>
	<li class="groupend"><${param.sortOrderType==5?'div class="switchon"':'a' } href="#" onclick="$('#sortOrderType').attr('value', 5);$('.orderbtn').html($(this).html());encodeKeyword2_()" >销售排行低到高</${param.sortOrderType==5?'div':'a' }></li>
	
	<li <c-rt:if test="${empty param.searchKeyword}">style="display:none"</c-rt:if> id="relatedSort"><${(param.sortOrderType==6||empty param.sortOrderType)?'div class="switchon"':'a' } href="#" onclick="$('#sortOrderType').attr('value', 6);$('.orderbtn').html($(this).html());encodeKeyword2_()" >相关度</${(param.sortOrderType==6|| empty param.sortOrderType)?'div':'a' }></li>

	</ul>
	<c-rt:if test="${!empty param.searchKeyword}">
	<input type="hidden" name="sortOrderType" value="${!empty param.sortOrderType?param.sortOrderType:'6' }" id="sortOrderType"/>
	</c-rt:if>
	<c-rt:if test="${empty param.searchKeyword}">
	<input type="hidden" name="sortOrderType" value="${!empty param.sortOrderType?param.sortOrderType:'0' }" id="sortOrderType"/>
	</c-rt:if>
	</div></div>  
<div class="f-lt"><span class="show-num">每页显示：</span>
<select class="" name="pageSize" onchange="encodeKeyword2_()">
<option value="40" <c-rt:if test="${param.pageSize==40 }">selected="selected"</c-rt:if>>40</option>
<option value="60" <c-rt:if test="${param.pageSize==60 }">selected="selected"</c-rt:if>>60</option>
</select>
</div>
<p align="right">共${pager.totalSize}笔：${pager.currentPage+1}/${pager.pageSize} 
<c:choose><c:when test="${pager.currentPage==0}">
	<span class="a-no">&lt; 上一页</span>
</c:when><c:otherwise>
	<a href="###" onclick="document.formObj.currentPage.value=${pager.currentPage-1};encodeKeyword2_();return false;"><span class="a-togo">&lt; 上一页</span></a>
</c:otherwise></c:choose>
 | 
<c:choose><c:when test="${pager.currentPage == pager.pageSize-1}">
	<span class="a-no"> 下一页 &gt;</span>
</c:when><c:otherwise>
	<a href="###" onclick="document.formObj.currentPage.value=${pager.currentPage+1};encodeKeyword2_();return false;"><span class="a-togo">下一页 &gt;</span></a>
</c:otherwise></c:choose>
</p>

	</div>
	</div>
	
	
	<!-- 过滤bar -->
	
	<!--列表区块 -->
<% pageContext.setAttribute("newline","\n");%>
<s:url var="prodlink" value="/product/product.do"/>
<ul class="search-list">
<c-rt:forEach items="${result1.docs }" var="doc" varStatus="status">
<c-rt:set var="rpn">
<b>${pu:urlDecoding(param.searchKeyword, 'UTF-8') }</b>
</c-rt:set>
<%--
<c-rt:choose>
<c-rt:when test="${!empty param.z && param.z!='0'}">
${pu:reqSet('categoryId', param.z) }
${pu:reqSet('ct', param.z) }
</c-rt:when>
<c-rt:otherwise>
--%>
${pu:reqSet('categoryId', doc.mainCategoryId) }
${pu:reqSet('ct', doc.mainCategoryId) }
<%--
</c-rt:otherwise>
</c-rt:choose>
--%>
<c-rt:if test="${doc.type ne 6}">
<%try{ %>
${pu:reqSet('campaigns', pu:validCampaign(categoryId, doc.productId))}
<%}catch(Exception e){} %>
</c-rt:if>
	<li>
		<a href="${prodlink}?productId=${doc.productId}&z=${ct}" target="_blank" class="pd-img" id="pd-img_${status.index }"  rel="http://s.yaodian100.com/PImg/${pu:substring(doc.productId, 0, 4)}/${doc.productId }/${doc.productId }_m250.jpg">
		<img id="pimg_${status.index }" src="${imgDomain}/images/none1.gif" original="${imgDomain}/PImg/<c:out value="${fn:substring(doc.productId,0,4)}"/>/${doc.productId}/${doc.productId}_m135.jpg" alt="${doc.productName}" width="135" height="135" onError="this.src='${imgDomain}/PImg/blank_135.gif'"/></a>
	
		<div class="pd-info"> 
                <em><a href="${prodlink}?productId=${doc.productId}&z=${ct}" target="_blank" title="${doc.promoteName}">${pu:replaceAll(doc.promoteName, pu:urlDecoding(param.searchKeyword, 'UTF-8'), rpn)}</a></em>
			<h6><a href="${prodlink}?productId=${doc.productId}&z=${ct}" target="_blank" title="${doc.productName}">${pu:replaceAll(doc.productName, pu:urlDecoding(param.searchKeyword, 'UTF-8'), rpn)}</a></h6>
			<p class="pdtxt">
			<%-- 
			${pu:replaceAll(fn:replace(doc.productBrief, newline, "<br>"), pu:urlDecoding(param.searchKeyword, 'UTF-8'), rpn)}
			 --%>
			 ${pu:replaceAll(pu:replaceAll(doc.productBrief, pu:urlDecoding(param.searchKeyword, 'UTF-8'), rpn), newline, '<br>') }
			</p>
			
                <div class="money-area">
			<s><span>￥<fmt-rt:formatNumber value="${doc.listPrice}"  pattern="########0.0"/></span></s><strong>￥<fmt-rt:formatNumber value="${doc.shelfPrice}"  pattern="########0.0"/></strong>
			</div>
            </div> 
		
		
		<div class="pferent-area"> 
		
			<c-rt:if test="${!empty campaigns}">
			<c-rt:forEach items="${campaigns}" var="campaign">
            <p><span class="type-4">优惠</span>
            
            
            <span title="${campaign.campaignName}">${pu:substring(campaign.campaignName, 0, 9)}</span>
            
            </p> </c-rt:forEach>
            </c-rt:if>
            <c-rt:if test="${doc.hasCoupon}">
            
       		<p><span class="type-money">&nbsp;</span>买就<span class="txt-rd">送积分 ${doc.coupon }</span></p> 

            </c-rt:if>
            <c-rt:if test="${doc.hasPresent}">
            <p><span class="type-2">赠品</span>
            

            <span title="${doc.present}">${doc.present}</span>
 
            	</p>
            </c-rt:if>
            <c-rt:if test="${doc.type ne 6 && doc.hasAddon}"> 
            <p><span class="type-3">加購</span>搭配加购享加值优惠</p> 
            </c-rt:if>
            <c-rt:if test="${doc.type eq 1}">
             ${pu:reqSet('product', pu:get('com.yaodian100.ec.product.entity.Product', doc.productId)) }
			<p class="pre-txt"><span class="type-1">预购</span>
			预计<span class="txt-rd"><fmt-rt:formatDate value="${product.expectShipDate}" pattern="yyyy-MM-dd"/></span>出货</p>
			</c-rt:if>
        </div>
        <div class="btn-area">
        
        <a href="${prodlink}?productId=${doc.productId}&z=${ct}" class="sbuy" target="_blank">购买</a>
        
        <a href="###" id="addWishList_${doc.productId}_${doc.shelfPrice}" class="icon-collection">加入收藏</a></div> 
	
	

	</li>
</c-rt:forEach>
</ul>
<c-rt:forEach items="${result1.docs }" var="doc" varStatus="status">
	<div class="morepdinfo1" style="display:none" id="morepdinfo1_${status.index }"><div class="arrowarea"><img src="/images/mpdinfo-areal.gif" border="0"></div><div class="pdinfo"><a href="#"><img src="${imgDomain}/images/none1.gif" original="${imgDomain}/PImg/${pu:substring(doc.productId, 0, 4)}/${doc.productId }/${doc.productId }_m250.jpg" alt="" width="250" height="250" onError="this.src='${imgDomain}/PImg/blank_250.gif'"/></a></div></div>

</c-rt:forEach>
<jsp:include page="/common/collection.jsp"/>
	<p class="page-change">
	<a href="#" class="f-rt"><span class="a-top"></span>TOP</a> 
	第${pager.currentPage+1}页，共${pager.pageSize}页
<c:choose><c:when test="${pager.currentPage==0}">
	<span class="a-no">&lt; 上一页</span> |
</c:when><c:otherwise>
	<a href="###" onclick="document.formObj.currentPage.value=${pager.currentPage-1};encodeKeyword2_();return false;" class="a-togo">&lt; 上一页</a> |
</c:otherwise></c:choose>
<c:forEach begin="${pager.startPage}" end="${pager.endPage}" var="currentPage">
<c:choose><c:when test="${pager.currentPage==currentPage-1}">
	<b class="pg-now">${currentPage}</b>
</c:when><c:otherwise>
	<a href="###" onclick="document.formObj.currentPage.value=${currentPage-1};encodeKeyword2_();return false;">${currentPage}</a>
</c:otherwise></c:choose>
</c:forEach>
<c:choose><c:when test="${pager.currentPage == pager.pageSize-1}">
	<span class="a-no"> | 下一页 &gt;</span>
</c:when><c:otherwise>
	 | <a href="###" onclick="document.formObj.currentPage.value=${pager.currentPage+1};encodeKeyword2_();return false;" class="a-togo">下一页 &gt;</a>
</c:otherwise></c:choose>
<span class="goto">跳至第<input name="jumpPage" id="jumpPage" type="text" size="1" maxlength="3" />页。</span><a class="gotopbtn" href="#" onclick="if(isNaN($('#jumpPage').attr('value'))){alert('请填数字');}else{document.formObj.currentPage.value=($('#jumpPage').attr('value')-1);encodeKeyword2_();}"><span>确认</span></a>

</p>
	<!--列表区块 END -->
	</c-rt:if>
	<c-rt:if test="${result1.total==0}">
	<div class="noresult"> 
		<input type="hidden" name="searchKeyword" value="${param.searchKeyword }"/>
        <div class="sorry"> 
          <h2>很抱歉，沒有找到与"<b><<c-rt:out value="${pu:urlDecoding(searchKeyword, 'UTF-8') }"/></b>"相关的内容。</h2> 
          <c-rt:if test="${fuzzySearchCount>0}">
          <p><a href="/ecmall/search/search.do?searchKeyword=${pu:urlEncoding(param.searchKeyword,'UTF-8')}&fuzzySearch=1">查看模糊搜索结果<%--(${fuzzySearchCount }) --%></a></p> 
          </c-rt:if>
        </div> 
        <div class="fielddot"></div> 
        <ul class="youtry"> 
          <h3>您可以尝试使用以下的方法：</h3> 
          <li>．查看输入的关键字是否有误。</li> 
          <li>．缩短或更改搜索的关键字后重新搜索。</li> 
          <li>．可点击类目进行筛选。</li> 
        </ul> 
      </div> 
	</c-rt:if>

	
	</div>
	</s:form>
	<div id="dialog"></div>
	<script type="text/javascript" src="http://s.yaodian100.com/js/rec.js">
	{
		"mid":27,
		"pid":"search",
		"kw":"${param.searchKeyword}",
		<c-rt:if test="${!empty mu:memberId()}">
		,"uid":"${mu:memberId()}",
		</c-rt:if>
		"layout":"search"
	}
	</script>
	<!-- content end -->